package com.zyw.exception;


import com.zyw.vo.ResultVO;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 *
 * 异常处理器
 *      处理项目中自己抛出的异常
 *
 */

//@ControllerAdvice
//@ResponseBody
@RestControllerAdvice
public class ManagermentSystemExceptionHandler {

    @ExceptionHandler(ManagermentSystemException.class)
    public ResultVO poorException(ManagermentSystemException ex){
        return new ResultVO(ex.getCode(),ex.getMessage(),null);
    }

}
